import { HTTP } from "../utils/http.js";

export class Suspect extends HTTP{
    
    index({id, hash, share_from}) {
        return this.request({
            url: 'suspect/index',
            data: {
                activity_id: id,
                hash,
                share_from
            }
        })
    }

    content(id) {
        return this.request({
            url: 'suspect/content',
            data: {
                activity_id: id
            }
        })
    }

    nextQuestion({activity_id, question_true_id, result, point,use_times}) {
        return this.request({
            url: 'suspect/nextQuestion',
            method: 'POST',
            data: {
                activity_id,
                question_true_id,
                result,
                point,
                use_times
            }
        })
    } 

    isCanAnswer(activity_id) {
        return this.request({
            url: 'suspect/isCanAnswer',
            data: {
                activity_id
            }
        })
    }

    shareGetPoint(activity_id) {
        return this.request({
            url: 'suspect/shareGetPoint',
            method: 'POST',
            data: {
                activity_id
            }
        })
    }

    creditGetQuestion(activity_id) {
        return this.request({
            url: 'suspect/creditGetQuestion',
            method: 'POST',
            data:{
                activity_id
            }
        })
    }

    getPrize(activity_id) {
        return this.request({
            url: 'suspect/getPrize',
            method: 'POST',
            data: {
                activity_id
            }
        })
    }

    showPrize(activity_id) {
        return this.request({
            url: 'suspect/showPrize',
            method: 'POST',
            data: {
                activity_id
            }
        })
    }

    winList(activity_id) {
        return this.request({
            url: 'suspect/winList',
            method: 'POST',
            data: {
                activity_id
            }
        })
    }
    
}